const INFO_KEY = 'hm_shopping_info';
export const getUserInfo = () => {
  const defaultObj = {
    token: '',
    userId: ''
  };
  const result = localStorage.getItem(INFO_KEY);
  return result ? JSON.parse(result) : defaultObj;
};
export const setUserInfo = (obj) => {
  localStorage.setItem(INFO_KEY, JSON.stringify(obj));
};
export const removeUserInfo = () => {
  localStorage.removeItem(INFO_KEY);
};
